import pyunittest
from HTMLTestRunner.HTMLTestRunner import HTMLTestRunner

tests = pyunittest.defaultTestLoader.discover(r"/pythonAutomated", pattern="TestCardManage.py")

runner = HTMLTestRunner(
    title="银行卡管理用例测试报告",
    description="银行卡管理用例测试报告",
    verbosity=2,  # 详细程度
    stream=open(file="银行卡管理用例测试报告.html", mode="w+", encoding="utf-8")
)

runner.run(tests)